home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Found / FWStream / Include / FWBufSin.h < prev    next >
Encoding:
Text File  |  1996-04-25  |  1.5 KB  |  54 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWBufSin.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWBUFSIN_H
  11. #define FWBUFSIN_H
  12.  
  13. #include "SLBufSin.xh"
  14.  
  15. #ifndef FWRANSIN_H
  16. #include "FWRanSin.h"
  17. #endif
  18.  
  19. //========================================================================================
  20. //    CLASS FW_PBufferedSink
  21. //
  22. //        Inherited API for operator->()
  23. //            long GetReadableBytes();
  24. //            void Read(in void * destination, in long count);
  25. //            long GetWritableBytes();
  26. //            void Write(in void* source, in long count);
  27. //
  28. //            long GetLength();
  29. //            void SetLength(in long length);
  30. //            long GetPosition();
  31. //            void SetPosition(in long position);
  32. //
  33. //        Inherited API for operator->()
  34. //            void Flush();
  35. //
  36. //========================================================================================
  37.  
  38. class FW_PBufferedSink : public FW_PRandomAccessSink
  39. {
  40. public:
  41.     FW_PBufferedSink(Environment* ev, FW_ORandomAccessSink* theSink, long capacity = 1024);
  42.         // Construct a buffered sink.  The buffered sink places a read/write buffer
  43.         // between clients and the sink itself.  The capacity is the number of bytes 
  44.         // in the buffer.
  45.  
  46.     virtual ~FW_PBufferedSink();
  47.  
  48. private:
  49.     FW_PBufferedSink(const FW_PBufferedSink&);
  50.     FW_PBufferedSink& operator=(const FW_PBufferedSink&);
  51. };
  52.  
  53. #endif
  54.